import {
	observer
} from 'mobx-react';
import {
	WeaTop,
	WeaRightMenu
} from 'ecCom';

@observer
export default class Top extends React.Component {
	render() {
		const {
			store,
		} = this.props, {
			title,
			loading,
			topProps,
			buttons,
			dropMenuDatas
		} = store;

		return (
			<WeaTop ecId={`${this && this.props && this.props.ecId || ''}_WeaTop@n24xwv`}
				{...topProps}
				title={title}
				buttons={buttons}
				dropMenuDatas={dropMenuDatas}
				loading={loading}
			>
				<WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@0bmniy`} datas={dropMenuDatas}>
					{this.props.children}
				</WeaRightMenu>
			</WeaTop>
		);
	}
}